package com.vegas.netspider.apps.task;

import java.util.List;

import com.vegas.netspider.apps.parser.WebParser;
import com.vegas.netspider.dto.MatchScore;
import com.vegas.netspider.memdb.dao.MatchScoreDao;

public class MatchScoreNetDataLoader extends NetDataLoaderProxyer {

	
	private String ftSocreUrl;
	private String bkScoreUrl;
	
	private WebParser<List<MatchScore>> ftparser;
	private WebParser<List<MatchScore>> bkparser;
	
	private MatchScoreDao ftCache;
	private MatchScoreDao bkCache;
	
	public void loadFtSocre() throws Exception{
		String resource = super.load(ftSocreUrl);
		List<MatchScore> list = ftparser.parse(resource);
		ftCache.push(list);
	}
	
	public void loadBkScore() throws Exception{
		String resource = super.load(bkScoreUrl);
		List<MatchScore> list = bkparser.parse(resource);
		bkCache.push(list);
	}

	public void setFtSocreUrl(String ftSocreUrl) {
		this.ftSocreUrl = ftSocreUrl;
	}

	public void setBkScoreUrl(String bkScoreUrl) {
		this.bkScoreUrl = bkScoreUrl;
	}

	public void setFtparser(WebParser<List<MatchScore>> ftparser) {
		this.ftparser = ftparser;
	}

	public void setBkparser(WebParser<List<MatchScore>> bkparser) {
		this.bkparser = bkparser;
	}

	public void setFtCache(MatchScoreDao ftCache) {
		this.ftCache = ftCache;
	}

	public void setBkCache(MatchScoreDao bkCache) {
		this.bkCache = bkCache;
	}
	
	
}
